package com.Tjise.JAVAzuoye1;

public class Circle extends Shape {
    double radius;

    @Override
    public double getArea() {
        return radius*radius*Math.PI;
    }

    @Override
    public double getPer() {
        return 2*Math.PI*radius;
    }

    @Override
    public String toString() {
        return "圆的周长是："+getPer()+",圆的面积是："+getArea()+"，颜色是："+getColor();
    }

    public Circle() {
    }

    public Circle(String color, double radius) {
        super(color);
        this.radius = radius;
    }
}
